//
//  AWAckMessage.h
//  AtWork2
//
//  Created by lucas on 15/4/23.
//  Copyright (c) 2015年 Foreveross. All rights reserved.
//

#import "AWMessage.h"

typedef NS_ENUM(NSUInteger, AWAckMessageType) {
    
    AWAckMessageTypeWrite = 0,
    
    AWAckMessageTypeRecv,
    
    AWAckMessageTypeRead
};

FOUNDATION_EXPORT inline AWAckMessageType parseWithAckMessageType(NSString *type);

@interface AWAckMessage : AWMessage

@property (nonatomic, strong, readonly) NSArray *ackIds;

@property (nonatomic, assign, readonly) AWAckMessageType ackMessageType;

@property (nonatomic, assign, readonly) UInt64 ackTime;

@property (nonatomic, copy, readwrite) NSString *sessionIdentifier;

+ (instancetype)ackMessageOfWriteWithFrom:(NSString *)from to:(NSString *)to ackIds:(NSArray *)ackIds ackTime:(UInt64)ackTime;

+ (instancetype)ackMessageOfRecvWithFrom:(NSString *)from to:(NSString *)to ackIds:(NSArray *)ackIds ackTime:(UInt64)ackTime;

+ (instancetype)ackMessageOfRecvWithFrom:(NSString *)from to:(NSString *)to ackIds:(NSArray *)ackIds;

+ (instancetype)ackMessageOfReadWithFrom:(NSString *)from to:(NSString *)to ackIds:(NSArray *)ackIds ackTime:(UInt64)ackTime;

@end
